package com.newtouch.nbo.service.impl;

import com.newtouch.nbo.service.DemoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.client.RestTemplate;

@Service
public class DemoServiceImpl  implements DemoService{
    @Autowired
    private RestTemplate restTemplate;

    /**
     * 查询
     * @param name
     * @return
     */
    @Override
    public String   hello(String name){
        return restTemplate.getForObject("http://EUREKA-CLIENT/hi?name="+name,String.class);
    }
}
